<template>
    <view class="notice" v-if="notice_list.length">
        <text class="left iconfont icon-tongzhigonggao-copy"></text>
        <swiper class="swiper-nav" :circular="true" vertical="true" :autoplay="true" :interval="5000" :duration="1000">
            <swiper-item style="display: table;" @touchmove.stop='stopTouchMove' v-for="(item,index) in notice_list" :key="index">
                <view style="display: table-cell;vertical-align: middle;" class="right" @click="notice(item.id)">{{item.title}}</view>
            </swiper-item>
        </swiper>
    </view>
</template>

<script>
export default {
    name: 'NoticeScroll',
    props: {
        notice_list: Array
    },
    data() {
        return {}
    },
    methods: {
        notice(id) {
            uni.navigateTo({
                url: '/cms/pages/notice/index?id=' + id
            })
        }
    }
}
</script>

<style>
@import url("~@/common/iconfont/iconfont.css");

.notice {
    display: flex;
    background-color: white;
    margin-bottom: 10px;
}

.left {
    width: 80upx;
    text-align: center;
    height: 45px;
    line-height: 45px;
    color: red;
}

.swiper-nav {
    width: 670upx;
    height: 45px;
}
</style>
